<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户分享数据</title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">


    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
    <script src="__JS__/jquery-3.1.1.min.js"></script>
</head>
<body>
<div class="container">
    <table class="table table-hover">
        <tr>
            <th>#</th>
            <th>用户id</th>
            <th>用户昵称</th>
            <th>用户下级数量</th>
            <th>用户分享关注数据</th>
            <th>用户余额</th>
            <th>用户操作</th>
        </tr>
        {volist name="userShareDetail" id="userShareDetail"}
        <tr>
            <td>{$i}</td>
            <td>{$userShareDetail.id}</td>
            <td>{$userShareDetail.nickname}</td>
            <td>{$userShareDetail.subordinate_num}</td>
            <td>{$userShareDetail.num}</td>
            <td>{php}echo ($userShareDetail['amount']+$userShareDetail['fall_into_amount'])/100{/php}</td>
            <td><button class="btn btn-info" onclick="user_lock({$userShareDetail.id})">冻结用户</button></td>
            <td><a href="{:url('user/shareView',['openid'=>$userShareDetail['openid']])}"  target="_blank" class="btn btn-danger">分享画像</a></td>
        </tr>
        {/volist}
        {$page}
    </table>
</div>
<script>
function user_lock(id){
    $.post("{:url('user/userLock')}",{id:id},function (data) {
             if(data==1){
                 alert("冻结成功");
             }else{
                 alert("冻结失败或已冻结过");
             }
    })
}
</script>
</body>
</html>